package com.zerox.order.openfeign.service;

import com.zerox.commons.utils.ResponseResult;
import com.zerox.order.domain.pojo.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @auth wzy
 * @date 2023/3/16 14:13
 */
@Component
@FeignClient("cloud-payment-service")
public interface PaymentFeignService {

    @GetMapping("/payment/{id}")
    ResponseResult getPayment(@PathVariable("id") Long id);

    @PostMapping("/payment/create")
    public ResponseResult create(@RequestBody Payment payment);
}
